package com.sky.service.impl;

import com.sky.domain.Notice;
import com.sky.mapper.NoticeMapper;
import com.sky.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 尹稳健~
 * @version 1.0
 */
@Service
public class NoticeServiceImpl implements NoticeService {

    @Autowired
    private NoticeMapper noticeMapper;

    @Override
    public List<Notice> findAll(String title) {
        return noticeMapper.findAll(title);
    }

    @Override
    public Notice findNoticeById(Integer id) {
        return noticeMapper.findNoticeById(id);
    }

    @Override
    public void update(Notice notice) {
        noticeMapper.update(notice);
    }

    @Override
    public void insert(Notice notice) {
        noticeMapper.insert(notice);
    }

    @Override
    public void delete(Integer id) {
        noticeMapper.delete(id);
    }
}
